                                          Phantasy Star II
                                     Reduced Flicker and Flash
                                        v1.00 (Nov 14 2020)

------------------------------------

- Phantasy Star II (c) Sega. All rights reserved.

- No ownership is claimed by veo over Phantasy Star II or the franchise from which it originates.
   Commercial use of this patch, including but not limited to reproduction, sale, etc. is strictly
   prohibited.

- This unofficial, fan-made patch is provided "as-is" on a voluntary (i.e. non-profit) basis. veo
   is not liable for damage incurred to the end-user, their OS, or their hardware while using this
   patch.

- Apply this patch only to "Phantasy Star II (UE) (REV02) [!].bin" with the following
   specifications.
     Hashes: CRC32 - 904FA047
               MD5 - 0FA38B12CF0AB0163D865600AC731A9A
              SHA1 - 0711080E968490A6B8C5FAFBB9DB3E62BA597231

- Players are encouraged to keep a backup of their original game file in case an error occurs.

------------------------------------

   Preface

When allies and enemies are damaged in Phantasy Star II, three times their sprites flicker and the
screen flashes red. The flickering artificially extends battles and the red flashing poses an issue
for people with epilepsy or related disorders.

To address these problems, three patches are included in this archive:

1. PSII - Minimal Flickering.ips (by veo)
    Enemies and allies will only flicker once when damaged.

2. PSII - No Red Flashes.ips (by veo)
    Disables the screen flashing red when units are damaged.

3. PSII - Abbreviated Victories.ips (by vivify93)
    Reduces the battle reward messages to say, "XXXX and party win!", "### EXP.", and "### MST."

NOTE: To apply multiple patches in tandem, you may need to reverify the checksum with Kuwabara's
      utility Fix CheckSum. https://www.romhacking.net/utilities/342/

------------------------------------

   Changelog

v1.00 (Nov 14 2020)

- Reduced the flickering frames.

- Removed the red flashes.

- Added additional patch to truncate post-battle victory messages.

------------------------------------

   Source for Implementing into lory1990's Disassembly

Minimal Flickering

ps2disasm-master\ps2.asm

loc_3308:
	lea	(Characters_RAM).w, a2
	move.w	$2C(a0), d0
	lsl.w	#7, d0
	adda.w	d0, a2
	tst.w	(a2)
	beq.s	loc_338C
	btst	#7, 3(a2)
	beq.s	loc_338C
	bset	#6, 3(a2)
	bne.s	loc_3386
	move.b	#SFXID_Sword, (Sound_queue).w	; this is the generic sound when characters/enemies get hurt
	move.w	#$30, $30(a2) ; CHANGE TO: #$10, $30(a2)



No Red Flashes

ps2disasm-master\ps2.asm

Character_IsHit:
	btst	#4, battle_status(a0)	; did character receive no damage (e.g. 0 damage, miss, healing)?
	bne.s	Character_Display		; if so, branch
	move.w	hit_timer(a0), d0
	andi.w	#$F, d0
	beq.s	loc_1BE4
	cmpi.w	#8, d0
	bne.s	loc_1C1A
	move.l	#$E000E, d0 ; CHANGE TO: #$00200, d0



Abbreviated Victories

ps2disasm-master\data\script\en\battle.asm

loc_1D3E0:
	dc.b	$BB, " and party are" ; CHANGE TO: $BB, " and party win!"
	dc.b	$C3                   ; REMOVE
	dc.b	"victorious!"         ; REMOVE
	dc.b	$C4

loc_1D3FC:
	dc.b	$C0, " experience" ; CHANGE TO: $C0, " EXP."
	dc.b	$C3                ; REMOVE
	dc.b	"points!"          ; REMOVE
	dc.b	$C4

loc_1D411:
	dc.b	"Receive ", $C0 ; CHANGE TO: $C0, " MST."
	dc.b	$C3             ; REMOVE
	dc.b	"meseta!"       ; REMOVE
	dc.b	$C4